<template>
    <div class="test-list">
        <h3>box-shadow被overflow截断问题</h3>
        <div class="test-list-content">
            <a class="prev">prev</a>
            <a class="next">next</a>
            <div class="bd">
                <ul>
                    <li v-for="index in 10" :key="index" class="test-item">
                        <p>test {{ index }}</p>
                    </li>
                </ul>
            </div>
        </div>
    </div>
</template>

<style lang="scss">
.test-list {
    margin: 20px 0;
    h3 {
        margin-bottom: 10px;
        font-size: 16px;
    }
}
.test-list-content {
    position: relative;
    .prev,
    .next {
        position: absolute;
        z-index: 2;
        display: block;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: rgba($color: #000000, $alpha: 0.5);
        color: #fff;
        text-align: center;
        user-select: none;
        line-height: 40px;
        top: 50%;
        margin-top: -20px;
    }
    .prev {
        left: 0;
    }
    .next {
        right: 0;
    }
    .bd {
        position: relative;
        z-index: 1;
        .tempWrap {
            // 留出最左侧阴影尺寸
            margin-left: -10px !important;
        }
    }
}
.test-item {
    position: relative;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;

    float: left;
    width: 285px;
    height: 180px;
    border-radius: 6px;

    // 留出上、右、下、左的阴影尺寸
    // 阴影尺寸10px，两个item间隔20px
    margin: 10px 10px 10px 10px;
    box-shadow: 0 0 10px rgba($color: #000000, $alpha: 0.5);
}
</style>
